#include "ThreadDirectDriveController.h"
#include "ThreadDriveSequnce.h"

#define TACH_IRQ_NUMBER 0
#define TACH_ISR_PIN 2
#define TACH_ISR_MODE FALLING
#define SERVO_CLUTCH_PIN 10
#define MAX_SERVO_CLUTCH_SPEED 4500
#define INITIAL_CLUTCH_POSITION DEGREE_CLUTCH_UP
#define INITIAL_CLUTCH_RATE 0
#define DEGREE_CLUTCH_UP 180
#define RATE_CLUTCH_UP 0
#define DEGREE_CLUTCH_DOWN 150
#define RATE_CLUTCH_DOWN 60
#define SERVO_THROTTLE_PIN 9
#define MAX_THROTTLE_CLUTCH_SPEED 4500
#define INITIAL_THROTTLE_POSITION DEGREE_THROTTLE_LOW
#define INITIAL_THROTTLE_RATE 0
#define DEGREE_THROTTLE_HIGH 18
#define RATE_THROTTLE_HIGH 1
#define DEGREE_THROTTLE_LOW 10
#define RATE_THROTTLE_LOW 0
#define SECONDS_FULL_THROTTLE 7
#define SECONDS_IDLE 7
#define LOAD_WHEEL_MIN_RPM 70

ThreadDriveSequnce threadDriveSequnce( TACH_IRQ_NUMBER, TACH_ISR_PIN, TACH_ISR_MODE, SERVO_CLUTCH_PIN, MAX_SERVO_CLUTCH_SPEED, INITIAL_CLUTCH_POSITION, INITIAL_CLUTCH_RATE, DEGREE_CLUTCH_UP, RATE_CLUTCH_UP, DEGREE_CLUTCH_DOWN, RATE_CLUTCH_DOWN, SERVO_THROTTLE_PIN, MAX_THROTTLE_CLUTCH_SPEED, INITIAL_THROTTLE_POSITION, INITIAL_THROTTLE_RATE, DEGREE_THROTTLE_HIGH, RATE_THROTTLE_HIGH, DEGREE_THROTTLE_LOW, RATE_THROTTLE_LOW, SECONDS_FULL_THROTTLE, SECONDS_IDLE, LOAD_WHEEL_MIN_RPM );

void setup()
{
  // don't need no freakin' setup, ya n00bs!
}

void loop()
{
  threadDriveSequnce.run();
}
